package dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler;

import util.DBUtils;
import util.DataSourceManager;
import bean.Help;
import bean.RecommendPics;
import bean.Title;
import bean.Topic;

public class RecommendPicsDao {
	private QueryRunner runner = new QueryRunner(DataSourceManager.getSource());



	public List<RecommendPics> getRecommendPics() {
		List<RecommendPics> list=null;
		String sql ="select img_url,jumpto_url from recommendPic";
		try {
			list = runner.query(sql, new BeanListHandler<RecommendPics>(
					RecommendPics.class));
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
				
		return list;
	}

	
}
